Problems with tag O(n * sqrt(r))